<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/oa/leave.js?time=' + sys_get_time();
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
		
		}
	});
	$('#editLeaveApplyForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
});
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<div>
	<h3>编辑请假信息</h3>
</div>
<div style="width:400px;float:left;">
	<form id="editLeaveApplyForm" class="control-group">
		<table class="table table-striped"><input type="hidden" id="agree" name="agree" value="${(leave.agree)!''}" />
			<tr style="height:40px;"><td class="table-left">是否负责人</td>
					<td><@mt.YesOrNo value=((leave.head)!false) r=true name='head' d=false mc=false />
						<input type="hidden" id="code" name="code" value="${(leave.code)!''}"/>
						<input type="hidden" id="oc" name="oc" value="${(leave.oc)!''}"/>
					</td>
				</tr>
			<tr>	
				<td class="table-left">开始时间</td>
				<td><input id="start" type="text" name="st" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" value="${(leave.st?string('yyyy-MM-dd'))!''}">
			</tr>
			<tr>
				<td class="table-left">结束时间</td>
				<td><input id="end" type="text" name="et" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" value="${(leave.et?string('yyyy-MM-dd'))!''}"></td>
			</tr>
			<tr>
				<td class="table-left">原因</td>
				<td><textarea id="reason" name="reason" cols="30">${(leave.reason)!''}</textarea></td>
			</tr>
			<tr>
				<td colspan="2" style="text-align: center;">
					<#if leave??>
					<a href="#" class="btn btn-primary" onclick="javascript: history.back(); return false;">
						<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
					</a>
					<#else>
					<a href="#" class="btn btn-info" onclick="javascript: saveLeaveApply_leave(); return false;">
						<i class="icon-save"></i> &nbsp;保&nbsp;&nbsp;存
					</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="#" class="btn btn-primary" onclick="javascript: history.back(); return false;">
						<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
					</a>
					</#if>
				</td>
			</tr>
		</table>
	</form>
</div>
